import Vue from 'vue'
import App from './App.vue'
import router from './router'
//注册store
import store from './store'
//引入mock数据
import './mock'
//typenav 全局组件
import TypeNav  from '@/components/TypeNav'
//pagination  分页组件
import Pagination  from '@/components/Pagination'
//modal 弹框组件
import AddressModel from '@/components/AddressModel'

//引入swiper插件文件【就是让这个文件中的代码执行一次】
import './plugins/swiper'

//引入element-ui 插件
import './plugins/element-ui'

//引入validate（验证）组件
import './plugins/validate'

//引入API,API全局
import * as API from './api'


Vue.config.productionTip = false
Vue.component('TypeNav',TypeNav)
//注册分页
Vue.component('Pagination',Pagination)

new Vue({
  //定义$bus
  beforeCreate(){
    Vue.prototype.$bus = this;
    Vue.prototype.$API = API
  },
  render: h => h(App),
  //注册router
  router,
  store
}).$mount('#app')